#ifndef _ONLINEADDBUFFACTIVITY_H_
#define _ONLINEADDBUFFACTIVITY_H_
#include "MgrBase.h"
#include "SimpleRefection.h"
class OnlineAddBuffActivity:public ReflectionBase
{
	DECL_REFLECTION(OnlineAddBuffActivity,"../../config/OnlineAddBuffActivity.xml");
public:
	int32			m_iID;
	std::string		m_sDisplayName;

	std::vector<int32> m_vAddBuffs;
	std::string  m_sFromDate;
	int32 m_iFromHour;
	std::string m_sToDate;
	int32 m_iToHour;


	time_t m_iFromDateTime;
	time_t m_iToDateTime;


	bool IsInTime() const;


	rewrite virtual void OnArchieveReaded();
private:
};

typedef DefMangerTpl<OnlineAddBuffActivity> __OnlineAddBuffActivityManager; //eDefaultDef_Num
class OnlineAddBuffActivityManager:public __OnlineAddBuffActivityManager
{
public:
	static OnlineAddBuffActivityManager& Instance(){static OnlineAddBuffActivityManager _instance;return _instance;	}
	virtual void OnArchieveReaded();
	void UpdateCurrentActivitys();
	const std::set<const OnlineAddBuffActivity *>& GetCurrentActivity(){ return m_vCurrentActivitys;}
private:
	OnlineAddBuffActivityManager(){}
	std::vector<const OnlineAddBuffActivity *> m_vSortedActivitys;
	std::set<const OnlineAddBuffActivity *> m_vCurrentActivitys;
};

#endif
/////////////////////////////////////////
